package nc.ebs.message.webservice;


public class WebServiceSoapProxy implements WebServiceSoap {
  private String _endpoint = null;
  private WebServiceSoap webServiceSoap = null;
  
  public WebServiceSoapProxy() {
    _initWebServiceSoapProxy();
  }
  
  public WebServiceSoapProxy(String endpoint) {
    _endpoint = endpoint;
    _initWebServiceSoapProxy();
  }
  
  private void _initWebServiceSoapProxy() {
    try {
      webServiceSoap = (new WebServiceLocator()).getWebServiceSoap();
      if (webServiceSoap != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)webServiceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)webServiceSoap)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (webServiceSoap != null)
      ((javax.xml.rpc.Stub)webServiceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public WebServiceSoap getWebServiceSoap() {
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    return webServiceSoap;
  }
  
  public java.lang.String createCommonTask(java.lang.String fromSystem, java.lang.String passWord, java.lang.String WFSchema, java.lang.String WFDescription, java.lang.String xmlData, java.util.Calendar dueDate) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    return webServiceSoap.createCommonTask(fromSystem, passWord, WFSchema, WFDescription, xmlData, dueDate);
  }
  
  public void createTaskSet(java.lang.String passWord, java.lang.String setDescription, WFInvokeData[] list, javax.xml.rpc.holders.StringHolder createTaskSetResult, ArrayOfStringHolder taskIdList) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    webServiceSoap.createTaskSet(passWord, setDescription, list, createTaskSetResult, taskIdList);
  }
  
  public boolean sendSMS(java.lang.String passWord, java.lang.String eventId, java.lang.String create_System, java.lang.String send_Tag, java.lang.String send_Type, java.util.Calendar required_Send_Time, java.lang.String MSG_Body, java.lang.String DEST_ADDR) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    return webServiceSoap.sendSMS(passWord, eventId, create_System, send_Tag, send_Type, required_Send_Time, MSG_Body, DEST_ADDR);
  }
  
  public boolean sendEmail(java.lang.String passWord, java.lang.String eventId, java.lang.String create_System, java.lang.String send_Tag, java.lang.String send_Type, java.util.Calendar required_Send_Time, java.lang.String MSG_Title, java.lang.String MSG_Body, java.lang.String DEST_ADDR, java.lang.String CC_ADDR, java.lang.String SCC_ADDR, java.lang.String file_SerialNo) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    return webServiceSoap.sendEmail(passWord, eventId, create_System, send_Tag, send_Type, required_Send_Time, MSG_Title, MSG_Body, DEST_ADDR, CC_ADDR, SCC_ADDR, file_SerialNo);
  }
  
  public void sendIMMsg(java.lang.String passWord, java.lang.String create_System, java.lang.String send_Tag, java.lang.String send_Type, java.util.Calendar required_Send_Time, java.lang.String MESSAGE, org.apache.axis.types.UnsignedShort OPERATETYPE, org.apache.axis.types.UnsignedShort MSGTYPE, java.lang.String USERLIST, java.lang.String USERPWD, javax.xml.rpc.holders.BooleanHolder sendIMMsgResult, javax.xml.rpc.holders.StringHolder errorMsg) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    webServiceSoap.sendIMMsg(passWord, create_System, send_Tag, send_Type, required_Send_Time, MESSAGE, OPERATETYPE, MSGTYPE, USERLIST, USERPWD, sendIMMsgResult, errorMsg);
  }
  
  public void delNotifyEvent(java.lang.String passWord, java.lang.String eventId, javax.xml.rpc.holders.BooleanHolder delNotifyEventResult, javax.xml.rpc.holders.StringHolder errorMsg) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    webServiceSoap.delNotifyEvent(passWord, eventId, delNotifyEventResult, errorMsg);
  }
  
  public java.lang.String getNotifyEventId(java.lang.String passWord) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    return webServiceSoap.getNotifyEventId(passWord);
  }
  
  public void cancelWFInstance(java.lang.String instanceNumber, boolean isASet, javax.xml.rpc.holders.BooleanHolder cancelWFInstanceResult, javax.xml.rpc.holders.StringHolder errorMsg) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    webServiceSoap.cancelWFInstance(instanceNumber, isASet, cancelWFInstanceResult, errorMsg);
  }
  
  public boolean delWFInstance(java.lang.String passWord, java.lang.String instanceNumber, boolean isASet) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    return webServiceSoap.delWFInstance(passWord, instanceNumber, isASet);
  }
  
  public void switchUserInWorkFlow(java.lang.String instanceNumber, java.lang.String stateNumber, java.lang.String userName, java.lang.String fromUserId, java.lang.String fromUserRole, java.lang.String toUserId, javax.xml.rpc.holders.BooleanHolder switchUserInWorkFlowResult, javax.xml.rpc.holders.StringHolder errorMsg) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    webServiceSoap.switchUserInWorkFlow(instanceNumber, stateNumber, userName, fromUserId, fromUserRole, toUserId, switchUserInWorkFlowResult, errorMsg);
  }
  
  public void switchUserInWorkFlow2(java.lang.String instanceNumber, java.lang.String stateNumber, java.lang.String userName, java.lang.String fromUserId, java.lang.String fromUserRole, java.lang.String toUserId, java.lang.Object[] anyValue, javax.xml.rpc.holders.BooleanHolder switchUserInWorkFlow2Result, javax.xml.rpc.holders.StringHolder errorMsg) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    webServiceSoap.switchUserInWorkFlow2(instanceNumber, stateNumber, userName, fromUserId, fromUserRole, toUserId, anyValue, switchUserInWorkFlow2Result, errorMsg);
  }
  
  public void modifyInstanceDescription(java.lang.String instanceNumber, java.lang.String description) throws java.rmi.RemoteException{
    if (webServiceSoap == null)
      _initWebServiceSoapProxy();
    webServiceSoap.modifyInstanceDescription(instanceNumber, description);
  }
  
  
}